﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DTO;
using ModuleDALCore;

namespace DAL
{
    public class Sys_PageDAO:DALBase
    {
           private String _SpName ;
        public String SpName
        {
            get { return "SpSys_Page"; }
            set { _SpName = value; }
        }
        public Sys_PageDAO()
        {
            OpenConnect();
        }
        public DataTable GetSubMenu(Sys_Page page,int flag)
        {
            DataTable dt = new DataTable();
            try
            {
                dt = DBManager.Intance.ExecuteDataTable(SpName, ConvertClassToArray.GetParamName((Sys_Page)page, flag), ConvertClassToArray.GetValues((Sys_Page)page, flag));
            }
            catch (Exception ex)
            {
                throw new InvalidProgramException(ex.Message);
            }
            return dt;
        }

    }
}
